﻿<!DOCTYPE html>
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>火车票筛选 by easyui</title>
    <meta charset="utf-8" />
    <link rel="stylesheet" type="text/css" href="/ThirdParty/easyui/1.5/themes/default/easyui.css">
    <link rel="stylesheet" type="text/css" href="/ThirdParty/easyui/1.5/themes/icon.css">
 
    
    <script src="/ThirdParty/jquery/1.11.0/jquery.min.js" type="text/javascript"></script>
    <script src="/ThirdParty/easyui/1.5/jquery.min.js" type="text/javascript"></script>
</head>
<body>
    <fieldset class="layui-elem-field layui-field-title" style="margin-top: 30px;">
        <legend>搜索</legend>
        <form method="post">
        <div class="layui-inline">
            出发站：
            <input type="type" id="chufa" name="chufa" value="" class="layui-input" />
        </div>
        <div class="layui-inline">
            到站：
            <input type="type" id="daoda" name="daoda" value="" class="layui-input" />
        </div>
        <div class="layui-inline">
            日期：
            <input class="layui-input" placeholder="出发日期" onclick="layui.laydate({elem: this, festival: true})">
        </div>
        <div class="layui-inline">
            <button id="btnsec" type="button" id="btnSeach">
                查询</button>
        </div>
        </form>
    </fieldset>
    <table id="example" class="display" cellspacing="0" width="100%" 	data-options="singleSelect:true,collapsible:true,url:'/Handler1.ashx',method:'get'">
        <thead>
            <tr> 
                <th data-options="field:'queryLeftNewDTO.station_train_code',width:80">
                    车号
                </th>
                <th>
                    起点站
                </th>
                <th>
                    终点站
                </th>
                <th>
                    出发站
                </th>
                <th>
                    到站
                </th>
                <th>
                    出发时间
                </th>
                <th>
                    下车时间
                </th>
                <th>
                    车型
                </th>
                <th>
                    历时
                </th>
                <th>
                    能否网页购买
                </th>
                <th>
                    一等座
                </th>
                <th>
                    二等座
                </th>
                <th>
                    无座
                </th>
            </tr>
        </thead>
    </table>
    
</body>
</html>
<script>
    var stations;
    $(document).ready(function () {
        //获取所有站名
        $.getJSON("/station.ashx", function (rps) {

            stations = rps;

        });

        $.getJSON("/Handler1.ashx", function (rps) {
            //console.log(rps);
            SetData(rps.data);

        });

        $('#btnSeach').click(function () {
            $.post("/Handler1.ashx", $("form").serializeArray(), function (rps) {
                //console.log(rps);
                SetData(rps.data);

            });
        });


    });
    function SetData(data) {
        
    }         
</script>
 